package com.neutech.controller;

import com.neutech.mapper.MenuMapper;
import com.neutech.service.DoctorService;
import com.neutech.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;

import com.neutech.vo.*;
@CrossOrigin
@RestController
public class LoginController {
    @Autowired
    private MenuService menuService;
    @Autowired
    private DoctorService doctorService;

//    @RequestMapping("/login")
//    public String isLogin(){
//        return "ok23";
//    }

    @RequestMapping("/login2")
    public String isLogin(@RequestParam Map  map){
//        System.out.println(map.get("docid"));
//        System.out.println(map.get("name"));
//        System.out.println(map.get("depid"));
//        System.out.println(map.get("account"));
//        System.out.println(map.get("password"));
//        String str= (String) map.get("docid");
//        doctorService.insertDoctor(map);
        return "ok3";
    }

    @RequestMapping("/menu")
    public List<Map<String,Object>> getMenu(){
        return menuService.queryMenu();
    }
//
//    @RequestMapping("/user")
//    public List<Map<String,Object>> getDoctor(){
//        return doctorService.queryDoctor();
//    }
//    @RequestMapping("/user")
//    public void setDoctor(@RequestParam Map  map){
//        doctorService.insertDoctor(map);
//    }

}
